package demo;

import java.util.HashSet;
import java.util.Set;

/**
 * @Author liangzai
 * @Description:
 */
public class Training {
    public static void main(String[] args) {
        Set<String> set = new HashSet<>();
        for (double x1 = 0; x1 < 20; x1++) {
            for (double x2 = 0; x2 < 20; x2++) {
                for (double y1 = 0; y1 < 21; y1++) {
                    for (double y2 = 0; y2 < 21; y2++) {
                        if(x1==x2 || y1==y2){
                            continue;
                        }

                        double k = (y1-y2) / (x1-x2);
                        String kline = String.valueOf(k);
                        double b = y1 - (k*x1);
                        String bline = String.valueOf(b);
                        System.out.println(k+""+b);
                        System.out.println(kline+bline);
                        set.add(kline+bline);
                    }
                }
            }
        }
        System.out.println(set.size()+20+21);
    }
}
